#pragma once
#include <irrlicht.h>

using namespace irr;

class LightUnit
{
private:
	scene::ISceneNode *m_Node;
	scene::ILightSceneNode *m_Light;
	
	core::vector3df *m_Velocity;
	core::vector3df *m_Rotation;

	bool *m_curAngleReached;
	float *m_maxAngle;
	float *m_curMaxAngle;
	
	void CalculateLightPosition( core::vector3df *position );

	core::vector3df *MatrixRotation( core::vector3df *translate, core::vector3df *rotation );

public:	
	LightUnit( scene::ISceneNode *node, scene::ILightSceneNode *light );
	~LightUnit( void );

	void setPosition( core::vector3df position ) { 	m_Node->setPosition( position ); CalculateLightPosition( &position ); }
	scene::ISceneNode *getNode() { return m_Node; }

	void Update( void );
	void SmashLight( core::vector3df force );
};